#include "RedGunPhysics.h"

void RedGunPhysics::_updateBulletContainer() {
	if (!_armyData->_checkInRange() || _armyData->isDead || !_armyData->checkTargetAhead()) return;
	if (_armyData->bulletContainer->checkCanFire()) {
		_armyData->bulletContainer->fire(_armyData->getRect()->X, _armyData->getRect()->Y + deltaYBullet, 0, _armyData->targetRect, _armyData->isHalf);
	}
	_armyData->bulletContainer->update(0);
}

RedGunPhysics::RedGunPhysics(ArmyData* data) : GunPhysics(data) {
	deltaYBullet = 0;
	_life = 10;
	_armyData->bulletContainer->setMaxBullet(6);
}